<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        position: relative;
        width: 1200px;
        height: 200px;
        margin: 100px auto;
      }
      .close {
        position: absolute;
        right: -8px;
        top: 0;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <img src="./images/luzhou.jpg" alt="" />
      <img src="./images/close.jpg" alt="" class="close" />
    </div>
    <script>
      var box = document.querySelector(".box");
      var close = document.querySelector(".close");
      close.onclick = function () {
        box.style.display = "none";
      };
    </script>
  </body>
</html>
